home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
GAMETORS
/
WARRISK.LZH
/
BORDER.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-12-06
|
1KB
|
48 lines
Procedure Border( x,y,xl,yl,t,fg,bg:integer);
{This procedure will draw a double line border. Upper left corner will
be located at x,y. The border size will be xl by yl. t describes the border
type 1=double, 2= single, 3=double horiz single vert, 4=vice versa.}
CONST
s1 = '╔╗╚╝║═';
s2 = '┌┐└┘│─';
s3 = '╓╖╙╜║─';
s4 = '╒╕╘╛│═';
VAR
ul,ur,bl,br,up,sd:char;
tdat:string[6];
Begin
case t of {Select border configuration}
1: tdat:=s1;
2: tdat:=s2;
3: tdat:=s3;
4: tdat:=s4;
end;
ul:=copy(tdat,1,1);
ur:=copy(tdat,2,1);
bl:=copy(tdat,3,1);
br:=copy(tdat,4,1);
up:=copy(tdat,5,1);
sd:=copy(tdat,6,1);
Gotoxy(x,y);
FastWrite(ul,fg,bg,1); {Draw top line}
for i:=x to x+xl-3 do FastWrite(sd,fg,bg,1);
FastWrite(ur,fg,bg,1);
for i:=y+1 to y+yl-2 do {Draw side bars}
begin
gotoxy(x,i);
FastWrite(up,fg,bg,1);
gotoxy(x+xl-1,i);
FastWrite(up,fg,bg,1);
end;
gotoxy(x,y+yl-1);
FastWrite(bl,fg,bg,1); {Draw bottom line}
for i:=x to x+xl-3 do FastWrite(sd,fg,bg,1);
FastWrite(br,fg,bg,1);
end;